<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Bitter Mobile Template</title>
    <link rel="stylesheet" href="assets/css/style.css">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, width=device-width">
    <meta name="description" content="Bitter Mobile Template">
    <meta name="keywords" content="bootstrap, mobile template, cordova, phonegap, mobile, html, responsive" />
</head>

<body>

    <!-- Page loading -->
    <div class="loading">
        <div class="spinner-grow"></div>
    </div>
    <!-- * Page loading -->

    <!-- App Header -->
    <div class="appHeader">
        <div class="left">
            <a href="javascript:;" class="icon goBack">
                <i class="icon ion-ios-arrow-back"></i>
            </a>
        </div>
        <div class="pageTitle">忘记密码</div>
        <div class="right">
            <a href="people-login.html" class="link">登录</a>
        </div>
    </div>
    <!-- searchBox -->
    <div class="searchBox">
        <form>
            <span class="inputIcon">
                <i class="icon ion-ios-search"></i>
            </span>
            <input type="text" class="form-control" id="searchInput" placeholder="Search...">
            <a href="javascript:;" class="toggleSearchbox closeButton">
                <i class="icon ion-ios-close-circle"></i>
            </a>
        </form>
    </div>
    <!-- * searchBox -->
    <!-- * App Header -->

    <!-- App Capsule -->
    <div id="appCapsule" class="pb-2">

        <div class="appContent pb-0">

            <img src="assets/img/sample/draw-1.png" alt="img" class="img-fluid mb-3 mt-3">

            <div class="sectionTitle text-center">
                <div class="title">
                    <h1>重置密码</h1>
                </div>
                <div class="lead mb-3">输入用户名</div>
            </div>

            <form action="index.html">
                <div class="form-group">
                    <input type="text" class="form-control" id="phone" placeholder="手机号码/邮箱/用户名">
                </div>
                <div>
                    <button type="button" onclick="refresh()" class="btn btn-primary btn-lg btn-block">
                        提交
                    </button>
					<script>
						function refresh(){
							var PostStringToRear = function(url_suffix, raw_data, success_function) {
										let jqxhr = $.post('http://47.95.220.161:8080'+url_suffix, raw_data, success_function).fail(function (xhr, status) {
												console.log('失败: ' + xhr.status + ', 原因: ' + status);
											});
										return jqxhr;
								}
							let search_url_suffix = '/users/changePwd';
											let search_data = {
												"userNo":document.getElementById('phone').value,
												"vcode":"1",
												"password":"1"
												};
											let search_success = function(data) {
												window.location.href = "people-register.html"; 
												console.log('成功, 收到的数据: ' + JSON.stringify(data));
											};
											PostStringToRear(search_url_suffix, search_data, search_success);
							};
					</script>
                </div>
            </form>

            <div class="mt-3 text-center">
                没有账户? <a href="page-register.html">注册</a>
            </div>

        </div>


    </div>
    <!-- appCapsule -->

    <!-- ///////////// Js Files ////////////////////  -->
    <!-- Jquery -->
    <script src="assets/js/lib/jquery-3.4.1.min.js"></script>
    <!-- Bootstrap-->
    <script src="assets/js/lib/popper.min.js"></script>
    <script src="assets/js/lib/bootstrap.min.js"></script>
    <!-- Owl Carousel -->
    <script src="assets/js/plugins/owl.carousel.min.js"></script>
    <!-- Main Js File -->
    <script src="assets/js/app.js"></script>


</body>

</html>